//
//  GUIlayer.h
//  AtmKiller
//
//  Created by USoft on 6/10/14.
//
//

#ifndef GUI_LAYER_H
#define GUI_LAYER_H

#include "AbstractLayer.h"

class GUILayer : public AbstractLayer {
    UG_PROPERTY_FULL(Layer*, headerLayer,HeaderLayer);
    UG_PROPERTY_FULL(Layer*, notiLayer, NotiLayer);
    UG_PROPERTY_FULL(Label*, currentScoreLabel, CurrentScoreLabel);
    UG_PROPERTY_GETTER(Label*, currentComboLabel, CurrentComboLabel);
    UG_PROPERTY_GETTER(MenuItemSprite*, characterButton, CharacterButton);
    UG_PROPERTY_GETTER(MenuItemSprite*, pauseButton, PauseButton);
//    UG_PROPERTY_GETTER(MenuItemSprite*, shoppingButton, ShoppingButton);
    UG_PROPERTY_GETTER(__Array*, notiBoards, NotiBoards);
private:
    GameModel* gameModel;
    GUIListener* guiListener;
    StatusBar* comboBar;
    Face* scoreBoard;
    Label* speedLabel;
    BigNumber* currentCountScoreDouble;
    void initialize();
    void createLayers();
    void createLayersContent();
    void createAchievementNoti(int achievementId);
    
    virtual void onEnter();
    virtual void onExit();
public:
    GUILayer();
    ~GUILayer();
    virtual void update(float dt);
    void onShowAchievementNoti(Ref* data);
    void onCloseNotification(Ref* sender);
    void updateCurrentScore(BigNumber* score);
    CREATE_FUNC(GUILayer);
};

#endif /* defined(__AtmKiller__GUIlayer__) */
